package com.test.util;

import java.util.HashMap;
import java.util.Map;

public final class JsonResultCode {
	public static final int SUCCESS = 1;
	public static final int EXCEPTION = 5000;
	public static final int USERNAME_PASSWORD_WRONG = 5001;
	public static final int ACTION_FORBIDDEN = 5002;
	@SuppressWarnings("serial")
	private static final Map<Integer, String> codeMap = new HashMap<Integer, String>() {
		{
			this.put(SUCCESS, "success");
			this.put(EXCEPTION, "对不起，系统异常，请稍后再试");
			this.put(USERNAME_PASSWORD_WRONG, "账号或密码有误");
			this.put(ACTION_FORBIDDEN, "操作被拒");
		} 
	};

	public static String getMsg(int code) {
		return codeMap.get(code);
	}
}
